<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--[if lt IE 9]>
      <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <style>
        /* 设置class开头为col的样式 */
        
        [class^="col"] {
            border: 1px solid;
        }
    </style>
    <title>Document</title>
</head>

<body>
    <div class="container-row">
        <div class="col-lg-3">1</div>
        <div class="col-lg-3">2</div>
        <div class="col-lg-3">3</div>
        <div class="col-lg-3">4</div>
    </div>
    <!-- 如果孩子的份数相加等于12 则孩子能占满整个的container的宽度 -->
    <div class="container">
        <div class="col-lg-6 col-md-4 col-sm-6 col-xs-12">1</div>
        <div class="col-lg-2 col-md-4 col-sm-6 col-xs-12">2</div>
        <div class="col-lg-2 col-md-4 col-sm-6 col-xs-12">3</div>
        <div class="col-lg-2 col-md-4 col-sm-6 col-xs-12">4</div>
    </div>
    <!-- 如果孩子的份数相加小于12则会占不满整个container的宽度会有空白 -->
    <div class="container">
        <div class="col-lg-6">1</div>
        <div class="col-lg-2">2</div>
        <div class="col-lg-2">3</div>
        <div class="col-lg-1">4</div>
    </div>
    <!-- 如果孩子的份数相加大于12则 多于的那一列会另起一行显示 -->
    <div class="container">
        <div class="col-lg-6">1</div>
        <div class="col-lg-2">2</div>
        <div class="col-lg-2">3</div>
        <div class="col-lg-3">4</div>
    </div>
</body>

</html>